﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Vecen.BangChuang.Migrations
{
    public partial class Promotion : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Promotions",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    AreaCode = table.Column<long>(nullable: false),
                    ClickPrice = table.Column<decimal>(nullable: true),
                    CollegeName = table.Column<string>(maxLength: 64, nullable: true),
                    CreationTime = table.Column<DateTime>(nullable: false),
                    CreatorUserId = table.Column<long>(nullable: true),
                    Discription = table.Column<string>(maxLength: 256, nullable: true),
                    GraphicContent = table.Column<string>(maxLength: 2147483647, nullable: true),
                    InnerClickPrice = table.Column<decimal>(nullable: true),
                    Name = table.Column<string>(nullable: true),
                    PromotionStatus = table.Column<string>(maxLength: 32, nullable: true),
                    PutOnPrice = table.Column<decimal>(nullable: true),
                    PutOnTimeLimit = table.Column<int>(nullable: false),
                    ShowForUserType = table.Column<string>(nullable: true),
                    UniversityName = table.Column<string>(maxLength: 64, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Promotions", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Promotions");
        }
    }
}
